<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>水平垂直居中2.2</title>
		<style type="text/css">
			.wrap{
				width:400px;
				height:400px;
				background-color: lightgreen;
				display: flex;
				/*(1)
				 * justify-content: center;
				 * align-items: center; 
				 */
			}
			.item{
				width: 200px;
				height:200px;
				background-color: pink;
				align-self: center;
				margin: 0 auto;
				/*(2)margin: auto;*/
			}
		</style>
	</head>
	<body>
		<div class="wrap">
			<div class="item"></div>
		</div>
	</body>
</html>
